﻿@model ProductSummaryModel.SummaryItem

@using SmartStore.Web.Models.Catalog;

@{
	var list = Model.Parent;
	var artDetailUrl = Url.RouteUrl("Product", new RouteValueDictionary { { "SeName", Model.SeName } });
}

<div class="art-variant-info">
	@if (Model.ColorAttributes != null && Model.ColorAttributes.Any())
	{
		<div class="art-color-opts">
			@foreach (var clr in Model.ColorAttributes)
			{
				<a href='@clr.ProductUrl' class="art-color-opt" style="background-color: @clr.Color" title='@T("Products.ChooseColorX", clr.FriendlyName, clr.AttributeName)'></a>
			}
		</div>
	}

	@if (Model.Attributes.Any())
	{
		<div class="art-more-opts">
			<span class="bidi-embed@(list.ViewMode == ProductSummaryViewMode.List ? "" : " d-block")">@T(Model.Attributes.Count == 1 ? "Products.PlusOption" : "Products.PlusOptions"):</span>
			<a class="font-weight-medium bidi-embed" @Html.LanguageAttributes(Model.Attributes[0].Name) href="@artDetailUrl">@String.Join(", ", Model.Attributes.Select(x => x.Name.ToHtmlString())).Truncate(50, "...")</a>
		</div>
	}
</div>

